import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import './assets/css/common.css'

import { holoUI, holoUIOptions } from './plugin'

createApp(App)
  .use(router)
  .use(holoUI, holoUIOptions)
  .mount('#app')

// 前置路由守卫
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
